#ifndef SENSOR_H
#define SENSOR_H

#include "sensor_config.h"
#include "sensor_include.h"
#include "sensor_electrode.h"
#include "sensor_celectrode.h"
#include "sensor_welectrode.h"
#include "sensor_impedance.h"
#include "sensor_glucose.h"

void Sensor_UpdateParam(uint16 u16_CalFactor, sint16 s16_Offset);
void Sensor_ResetParam(void);
logical Sensor_ParamValid(void);
void Sensor_Initialize( uint32 u32_time,
                        uint32 u32_calTime,
                        fixed32 f32_calFactor,
                        fixed32 f32_offset,
                        comp64 c64_refImp,
                        fixed32 f32_naBias,
#if SENSOR_AUTOBASE
                        uint32 u32_num,
                        float f_base0,
                        float f_base,
#endif
                        int32 (*pf_ReadVCounter)(void),
                        int32 (*pf_ReadISig1)(void),
                        int32 (*pf_ReadISig2)(void),
                        uint64 (*pf_ReadImpedance)(uint) );
void Sensor_Reset( uint32 u32_time,
                   fixed32 f32_calFactor,
                   fixed32 f32_offset,
                   fixed32 f32_naBias
#if SENSOR_AUTOBASE
                  ,uint32 u32_num,
                   float f_base0,
                   float f_base
#endif
                   );
logical Sensor_MeasureGlucose( uint32 u32_time );
logical Sensor_MeasureImpedance( uint32 u32_time );
logical Sensor_Calibration( uint32 u32_time,
                            fixed32 f32_glucose
#if SENSOR_AUTOBASE
                           ,uint8 u8_limitScale
#endif
                            );
logical Sensor_IsGlucoseUpdated();


#endif // SENSOR_H
